*******************************************************************************
*** Description: 	This document provides code for reproducing the 		***
***					figures in the paper, "The Pigmentocracy of Executive  	***
***					Approval," which is authored by Shane P. Singh and Ryan	***
***					E. Carlin and appears in Comparative Political Studies.	***
***					It also provides the code for reproducing statistics 	***
***					associated with claims made in the text.				***
*******************************************************************************


**************
**************
*Set the Version                                                                                                                                 
**************
**************
version 17



**************
**************
*Install Required Packages                                                                                                                 
**************
**************
ssc install eclplot
ssc install labutil


**************
**************
*Open the AmericasBarometer Dataset
**************
**************
use "AmericasBarometer_Singh_and_Carlin_CPS.dta", clear



**************
**************
*Figure 3
**************
**************
preserve

keep	country* cntry*  ///
		skin_tone leader_skin_tone year
	
bysort cntryyear: egen mean_skin = mean(skin_tone)
bysort cntryyear: egen sd_skin = sd(skin_tone)
bysort cntryyear: gen minus1sd_skin = mean_skin-sd_skin
bysort cntryyear: gen plus1sd_skin = mean_skin+sd_skin


collapse skin_tone leader_skin_tone mean_skin minus1sd_skin plus1sd_skin cntryyearnum year, by(countryandyear_nohyphen)


sort leader_skin_tone countryandyear_nohyphen
gen n = _n
egen order = rank(n)

labmask order, val(countryandyear_nohyphen)

eclplot  mean_skin minus1sd_skin plus1sd_skin  order ///
	, estopts(mfcolor(white) mcolor(black) msymbol(circle)) ///
	  rplottype(rcap) ciopts(lcolor(black*.75)) ///
	  ytitle("") ylabel(,grid) ///
	  xtitle("", size(large))    ///
	  horiz scheme(s1mono) ysize(6.75) scale(.35) ylabel(1(1)84) 	///
	  addplot(scatter order leader_skin_tone,  msymbol(circle) mcolor(black) ) ///
	  legend(on order(3 "Leader Skin Tone Rating" 2 "Mean Respondent Skin Tone Rating" 1 "One SD Below and Above Respondent Mean") rows(3) size(medlarge))

restore



**************
**************
*Figure 4
**************
**************
sum skin_distance_leader 
global mean_skin = r(mean)

histogram skin_distance_leader,   ///
	fcolor(gs5) fintensity(100) lcolor(gs5) lwidth(medthick)  lalign(center)  bin(77) gap(0)  ///
				xlabel(	-9 "-9"  ///
						-6 `""-6" "{&larr}  Lighter" "   than Leader""'  ///
						-3 	"-3"  ///
						0 `""0" "Same Skin Tone"   "as Leader""' ///
						3 	"3"   ///
						6 `""6" "Darker  {&rarr}" "than Leader     ""' ///
						9 "9" ///
					, labsize(small)) ylabel(, labsize(small)) ///
	xtitle("") ///
	addplot(pci 0 $mean_skin  .4 $mean_skin, lcolor(black*1.25) lpattern(dash)) legend(off) /// 
	xsize(4.25) scheme(s1color) title("") note("") 
	
gr_edit .plotregion1.style.editstyle margin(small) editcopy

		
	
**************
**************
*Figure 5
**************
**************	
xtreg approve_prez c.skin_distance_leader c.skin_distance_leader#i.darker_than_leader ideo_distance_leader i.race education unemployed female i.ego_retro i.socio_retro, i(cntryyearnum)  fe 

sum skin_distance_leader
global min = r(min)
global max = r(max)
global increment_light = abs(($min-0)/20)
global increment_dark = abs(($max-0)/20)
margins, at(skin_distance_leader = ($min($increment_light)0) darker_than_leader=0) at(skin_distance_leader = (0($increment_dark)$max) darker_than_leader=1) predict(xb) atmeans level(90) post

marginsplot, level(90)  ///
     recast(line) recastci(rarea) scheme(s1color) ///
     ci1opts(color(black*.5%50) lwidth(vthin) lcolor(black*.2%50))  /// 
     plot1opts(lcolor(black*1.25%50) lwidth(medium))  /// 
	 ci2opts(color(black*.5%50) lwidth(vthin) lcolor(black*.2%50))  /// 
     plot2opts(lcolor(black*1.25%50) lwidth(medium))  /// 
	 title("")  ///
	 xsize(4.25)	 ///
	 addplot(histogram skin_distance_leader  /// 
		, 	yaxis(2) xaxis(2) lcolor(black) lpattern(solid) ///
							xlabel(	-9 "-9"  ///
						-6 `""-6" "{&larr}  Lighter" "   than Leader""'  ///
						-3 	"-3"  ///
						0 `""0" "Same Skin Tone"   "as Leader""' ///
						3 	"3"   ///
						6 `""6" "Darker  {&rarr}" "than Leader     ""' ///
						9 "9" ///
					, labsize(small)) ylabel(, labsize(small)) ///
			xscale(range(-9 9) lwidth(none)  axis(2)) xlabel(none, axis(2)) ///
			xtitle("") ///
			xtitle("", axis(2)) ///
			ylabel(2.75(.25)3.75, labsize(small))  yscale(range(2.60 3.80)) ///
			ylabel(0 10, axis(2)) fcolor(gs2) lcolor(gs2) lwidth(vthin) lalign(center) gap(0) width(.15)  /// 
			yscale(off   axis(2)) ///
			ytitle("Predicted Approval of Leader", size(medsmall)) ///
			ytitle("", axis(2)) ///
			legend(off)) 	
	


**************
**************
*Figure 6
**************
**************
xtreg approve_prez c.skin_distance_leader i.ego_retro c.skin_distance_leader#i.darker_than_leader c.skin_distance_leader#i.ego_retro c.skin_distance_leader#i.darker_than_leader#i.ego_retro i.socio_retro ideo_distance_leader i.race education unemployed female, i(cntryyearnum)  fe

sum skin_distance_leader
global min = r(min)
global max = r(max)
global increment_light = abs(($min-0)/20)
global increment_dark = abs(($max-0)/20)
margins, ///
	at(skin_distance_leader = ($min($increment_light)0) darker_than_leader=0 ego_retro=1) ///
	at(skin_distance_leader = ($min($increment_light)0) darker_than_leader=0 ego_retro=3) ///
	at(skin_distance_leader = (0($increment_dark)$max) darker_than_leader=1 ego_retro=1) ///
	at(skin_distance_leader = (0($increment_dark)$max) darker_than_leader=1 ego_retro=3) ///
	predict(xb) atmeans level(90) post
	
marginsplot, level(90)  ///
     recast(line) recastci(rarea) scheme(s1color) ///
     ci1opts(color(black*.5%50) lwidth(vthin) lcolor(black*.2%50))  /// 
     plot1opts(lcolor(black*1.25%50) lwidth(medium))  ///       
	 ci2opts(color(blue*.5%50) lwidth(vthin) lcolor(blue*.2%50))  /// 
     plot2opts(lcolor(blue*1.25%50) lwidth(medium))  ///  
	 ci3opts(color(black*.5%50) lwidth(vthin) lcolor(black*.2%50))  /// 
     plot3opts(lcolor(black*1.25%50) lwidth(medium))  ///  
	 ci4opts(color(blue*.5%50) lwidth(vthin) lcolor(blue*.2%50))  /// 
     plot4opts(lcolor(blue*1.25%50) lwidth(medium))  ///  
	 title("")  ///
	 xsize(4.25) ysize(4.75)	 ///
	 addplot(histogram skin_distance_leader  /// 
		, 	yaxis(2) xaxis(2) lcolor(black) lpattern(solid) ///
							xlabel(	-9 "-9"  ///
						-6 `""-6" "{&larr}  Lighter" "   than Leader""'  ///
						-3 	"-3"  ///
						0 `""0" "Same Skin Tone"   "as Leader""' ///
						3 	"3"   ///
						6 `""6" "Darker  {&rarr}" "than Leader     ""' ///
						9 "9" ///
					, labsize(small)) ylabel(, labsize(small)) ///
			xscale(range(-9 9) lwidth(none)  axis(2)) xlabel(none, axis(2)) ///
			xtitle("") ///
			xtitle("", axis(2)) ///
			ylabel(2.75(.25)3.75, labsize(small))  yscale(range(2.60 3.80)) ///
			ylabel(0 10, axis(2)) fcolor(gs2) lcolor(gs2) lwidth(thin) lalign(center) gap(0) width(.15)  /// 
			yscale(off   axis(2)) ///
			ytitle("Predicted Approval of Leader", size(medsmall)) ///
			ytitle("", axis(2)) ///
			legend(order(8 "Personal Economy Better" 7 "Personal Economy Worse" ) rows(2) size(vsmall)))



**************
**************
*Figure 7
**************
**************
xtreg approve_prez c.skin_distance_leader i.socio_retro c.skin_distance_leader#i.darker_than_leader c.skin_distance_leader#i.socio_retro c.skin_distance_leader#i.darker_than_leader#i.socio_retro i.ego_retro ideo_distance_leader i.race education unemployed female, i(cntryyearnum)  fe

sum skin_distance_leader
global min = r(min)
global max = r(max)
global increment_light = abs(($min-0)/20)
global increment_dark = abs(($max-0)/20)
margins, ///
	at(skin_distance_leader = ($min($increment_light)0) darker_than_leader=0 socio_retro=1) ///
	at(skin_distance_leader = ($min($increment_light)0) darker_than_leader=0 socio_retro=3) ///
	at(skin_distance_leader = (0($increment_dark)$max) darker_than_leader=1 socio_retro=1) ///
	at(skin_distance_leader = (0($increment_dark)$max) darker_than_leader=1 socio_retro=3) ///
	predict(xb) atmeans level(90) post

marginsplot, level(90)  ///
     recast(line) recastci(rarea) scheme(s1color) ///
     ci1opts(color(black*.5%50) lwidth(vthin) lcolor(black*.2%50))  /// 
     plot1opts(lcolor(black*1.25%50) lwidth(medium))  ///       
	 ci2opts(color(blue*.5%50) lwidth(vthin) lcolor(blue*.2%50))  /// 
     plot2opts(lcolor(blue*1.25%50) lwidth(medium))  ///  
	 ci3opts(color(black*.5%50) lwidth(vthin) lcolor(black*.2%50))  /// 
     plot3opts(lcolor(black*1.25%50) lwidth(medium))  ///  
	 ci4opts(color(blue*.5%50) lwidth(vthin) lcolor(blue*.2%50))  /// 
     plot4opts(lcolor(blue*1.25%50) lwidth(medium))  ///  
	 title("")  ///
	 xsize(4.25) ysize(4.75)  ///
	 addplot(histogram skin_distance_leader  ///  
		, 	yaxis(2) xaxis(2) lcolor(black) lpattern(solid) ///
							xlabel(	-9 "-9"  ///
						-6 `""-6" "{&larr}  Lighter" "   than Leader""'  ///
						-3 	"-3"  ///
						0 `""0" "Same Skin Tone"   "as Leader""' ///
						3 	"3"   ///
						6 `""6" "Darker  {&rarr}" "than Leader     ""' ///
						9 "9" ///
					, labsize(small)) ylabel(, labsize(small)) ///
			xscale(range(-9 9) lwidth(none)  axis(2)) xlabel(none, axis(2)) ///
			xtitle("") ///
			xtitle("", axis(2)) ///
			ylabel(2.75(.25)3.75, labsize(small))  yscale(range(2.60 3.80)) ///
			ylabel(0 10, axis(2)) fcolor(gs2) lcolor(gs2) lwidth(thin) lalign(center) gap(0) width(.15)  ///  
			yscale(off   axis(2)) ///
			ytitle("Predicted Approval of Leader", size(medsmall)) ///
			ytitle("", axis(2)) ///
			legend(order(8 "National Economy Better" 7 "National Economy Worse" ) rows(2) size(vsmall)))	
	
	
	
**************
**************
*Evidence for Claim Made in the Text: "238 individuals were directed from MTurk to our Qualtrics exercise. Each leader's skin tone was rated by roughly 220 respondents, 
*with a minimum of 210 and a maximum of 225."
**************
**************	
preserve 

***
*Open the required data set.
***
use "Complexion_Ratings.dta", clear

***
*Do the analysis
***
count
sum 

		
restore		



**************
**************
*Evidence for Claim Made in the Text: "We found no evidence that Raters' self-assessed skin tones were associated with variation in their ratings of leaders' skin tones. In a 
*linear regression of the variance in the skin tone rating assigned to each leader by each Rater on self- assessed Rater skin tone, the coefficient on Rater skin tone is 
*−0.009 with a two-sided p-value of 0.880."
**************
**************	
preserve 

***
*Open the required data set.
***
use "Complexion_Ratings.dta", clear

***
*Do the analysis
***
egen rating_sd = rowsd(gaston_browne_1-hugo_chavez_2)
gen rating_var = rating_sd^2

reg rating_var skin_tone
		
restore		





**************
**************
*Evidence for Claim Made in the Text: "The median Rater took 14 minutes and 35 seconds to complete the task."
**************
**************	

preserve 

***
*Open the required data set.
***
use "Complexion_Ratings.dta", clear

***
*Do the analysis
***
sum durationinseconds, detail
global p50 = r(p50)
di r(p50)/60 //*in minutes
		
restore		
		
		
		
**************
**************
*Evidence for Claim Made in the Text: "The distribution of [skin tone distance] in our sample... mean of 1.14 ... The bulk of the distribution is to the right of zero; about 72 percent of respondents were assessed to have a darker skin tone than their country's leader."
**************
**************
sum skin_distance_leader			
sum skin_distance_leader if skin_distance_leader<0
global number_lighter = r(N)
sum skin_distance_leader if skin_distance_leader>0
global number_darker = r(N)
sum skin_distance_leader
global number_total = r(N)

di $number_lighter/$number_total //*percent lighter than leader
di $number_darker/$number_total //*percent darker than leader

		
		
		
**************
**************
*Evidence for Claim Made in the Text: "Sample mean [of executive approval] is 3.21."
**************
**************			
sum approve_prez



**************
**************
*Evidence for Claim Made in the Text: "Results are unchanged if we use a measure of household wealth... "
**************
**************		
xtreg approve_prez c.skin_distance_leader c.skin_distance_leader#i.darker_than_leader ideo_distance_leader i.race education quintall female i.ego_retro i.socio_retro, i(cntryyearnum)  fe 




**************
**************
*Evidence for Claim Made in the Text: "We also estimated models that controlled for gender correspondence between survey respondents and leaders. This did not affect our substantive conclusions."
**************
**************			
gen female_leader = 0

replace female_leader = 1 if countryandyear == "Argentina_2010" //*Cristina Fernández de Kirchner
replace female_leader = 1 if countryandyear == "Argentina_2012" //*Cristina Fernández de Kirchner
replace female_leader = 1 if countryandyear == "Argentina_2014" //*Cristina Fernández de Kirchner

replace female_leader = 1 if countryandyear == "Brazil_2012" //*Dilma Rousseff
replace female_leader = 1 if countryandyear == "Brazil_2014" //*Dilma Rousseff

replace female_leader = 1 if countryandyear == "Chile_2014" //*Michelle Bachelet
replace female_leader = 1 if countryandyear == "Chile_2017" //*Michelle Bachelet

replace female_leader = 1 if countryandyear == "Costa Rica_2012" //*Laura Chinchilla
replace female_leader = 1 if countryandyear == "Costa Rica_2014" //*Laura Chinchilla

replace female_leader = 1 if countryandyear == "Jamaica_2012" //*Portia Simpson-Miller
replace female_leader = 1 if countryandyear == "Jamaica_2014" //*Portia Simpson-Miller

replace female_leader = 1 if countryandyear == "Trinidad & Tobago_2012" //*Kamla Persad-Bissessar
replace female_leader = 1 if countryandyear == "Trinidad & Tobago_2014" //*Kamla Persad-Bissessar

gen gender_correspondence = 0
replace gender_correspondence = 0 if female == 0 & female_leader == 1
replace gender_correspondence = 0 if female == 1 & female_leader == 0
replace gender_correspondence = 1 if female == 0 & female_leader == 0
replace gender_correspondence = 1 if female == 1 & female_leader == 1
replace gender_correspondence = . if female == .

 

xtreg approve_prez c.skin_distance_leader c.skin_distance_leader#i.darker_than_leader ideo_distance_leader i.race education unemployed female i.ego_retro i.socio_retro, i(cntryyearnum)  fe //*primary model

xtreg approve_prez c.skin_distance_leader c.skin_distance_leader#i.darker_than_leader ideo_distance_leader i.race education unemployed i.female gender_correspondence i.ego_retro i.socio_retro, i(cntryyearnum)  fe //*with control for gender correspondence
xtreg approve_prez c.skin_distance_leader c.skin_distance_leader#i.darker_than_leader ideo_distance_leader i.race education unemployed i.female##i.female_leader i.ego_retro i.socio_retro, i(cntryyearnum)  fe //*equivalent slope coefficients if you control for gender correspondence this way



**************
**************
*Evidence for Claim Made in the Text: "... the difference in the slopes of the two lines depicted in the graph (the coefficient on the interaction term) is significant (p < .001, two-sided)."
**************
**************	
xtreg approve_prez c.skin_distance_leader c.skin_distance_leader#i.darker_than_leader ideo_distance_leader i.race education unemployed female i.ego_retro i.socio_retro, i(cntryyearnum)  fe 
margins, dydx(skin_distance_leader) at(darker_than_leader = (0 1)) predict(xb) atmeans level(90) post coeflegend
lincom  _b[skin_distance_leader:2._at] - _b[skin_distance_leader:1bn._at]



**************
**************
*Evidence for Claim Made in the Text: "... going from an exact skin-tone match to three shades lighter on the PERLA palette in Figure 2 corresponds with a decline in predicted 
*approval of 0.088 units (p < .001, two-sided). . Going from an exact skin tone match to three shades darker corresponds with an increase in predicted approval of 0.016 units (p = .032, two-sided)."
**************
**************	
xtreg approve_prez c.skin_distance_leader c.skin_distance_leader#i.darker_than_leader ideo_distance_leader i.race education unemployed female i.ego_retro i.socio_retro, i(cntryyearnum)  fe 
margins, dydx(skin_distance_leader) at(darker_than_leader = (0 1)) predict(xb) atmeans level(90) post coeflegend
lincom 3 *  _b[skin_distance_leader:1bn._at]  //*impact of a three unit shift for lighter side
lincom 3 *   _b[skin_distance_leader:2._at] //*impact of a three unit shift for darker side


**************
**************
*Evidence for Claim Made in the Text: "... for someone who perceives worsening personal economic fortunes and has the same skin tone as the incumbent, predicted approval is 3.068.
*For someone who also perceives worsening personal economic fortunes but is three shades lighter than the incumbent, predicted approval is 0.167 units lower (p < .001, two-sided)."
**************
**************	
xtreg approve_prez c.skin_distance_leader i.ego_retro c.skin_distance_leader#i.darker_than_leader c.skin_distance_leader#i.ego_retro c.skin_distance_leader#i.darker_than_leader#i.ego_retro i.socio_retro ideo_distance_leader i.race education unemployed female, i(cntryyearnum)  fe
margins, at(skin_distance_leader = (0 -3) darker_than_leader = (0) ego_retro= (1)) predict(xb) atmeans level(90) post coeflegend
lincom _b[1bn._at] -  _b[2._at]


**************
**************
*Evidence for Claim Made in the Text: "... for those who are lighter than the leader and perceive improving economic fortunes, there is essentially no relationship between skin tone 
*distance and approval (p = .906, two-sided)."
**************
**************	
xtreg approve_prez c.skin_distance_leader i.ego_retro c.skin_distance_leader#i.darker_than_leader c.skin_distance_leader#i.ego_retro c.skin_distance_leader#i.darker_than_leader#i.ego_retro i.socio_retro ideo_distance_leader i.race education unemployed female, i(cntryyearnum)  fe
margins, dydx(skin_distance_leader) at(darker_than_leader = (0) ego_retro= (3)) predict(xb) atmeans level(90) 



**************
**************
*Evidence for Claim Made in the Text: "For those lighter than the incumbent who perceive national-level economic fortunes to have improved in recent months, skin tone distance has a negligible impact on predicted approval (p = .870, two-sided)."
**************
**************	
xtreg approve_prez c.skin_distance_leader i.socio_retro c.skin_distance_leader#i.darker_than_leader c.skin_distance_leader#i.socio_retro c.skin_distance_leader#i.darker_than_leader#i.socio_retro i.ego_retro ideo_distance_leader i.race education unemployed female, i(cntryyearnum)  fe
margins, dydx(skin_distance_leader) at(darker_than_leader = (0) socio_retro= (3)) predict(xb) atmeans level(90) 


**************
**************
*Evidence for Claim Made in the Text: "For someone with the same skin tone as the incumbent and who perceives worsening national economic fortunes, predicted approval is 2.941. For someone 
*who is three shades lighter, according to the palette depicted in Figure 2, and perceives worsening macroeconomic circumstances, predicted approval is 0.140 units lower (p < .001, two-sided)."
**************
**************	
xtreg approve_prez c.skin_distance_leader i.socio_retro c.skin_distance_leader#i.darker_than_leader c.skin_distance_leader#i.socio_retro c.skin_distance_leader#i.darker_than_leader#i.socio_retro i.ego_retro ideo_distance_leader i.race education unemployed female, i(cntryyearnum)  fe
margins, at(skin_distance_leader = (0 -3) darker_than_leader = (0) socio_retro= (1)) predict(xb) atmeans level(90) post coeflegend
lincom _b[1bn._at] -  _b[2._at]


**************
**************
*Evidence for Claim Made in the Text: "In the model used to create Figure 5, results of which are shown in Model 1 of Table A1 in Section 6 of the Supplementary Material, we find the impact of skin 
*tone distance to be roughly 45 percent of that of ideological distance for those lighter in skin tone than the executive."
**************
**************	
xtreg approve_prez c.skin_distance_leader c.skin_distance_leader#i.darker_than_leader ideo_distance_leader i.race education unemployed female i.ego_retro i.socio_retro, i(cntryyearnum)  fe 
margins, dydx(ideo_distance_leader) predict(xb) atmeans level(90) post coeflegend
global ideology_beta =  _b[ideo_distance_leader]

xtreg approve_prez c.skin_distance_leader c.skin_distance_leader#i.darker_than_leader ideo_distance_leader i.race education unemployed female i.ego_retro i.socio_retro, i(cntryyearnum)  fe 
margins, dydx(skin_distance_leader) at(darker_than_leader = (0)) predict(xb) atmeans level(90) post coeflegend
global skin_lighter_beta =  -_b[skin_distance_leader]


*To compare the coefficients, adjust for the observed ranges of each variable for those lighter than the executive, which are 5.30 for skin tone distance and 10 for ideological distance. 
*The range-adjusted impact of skin tone distance is thus −.029×5.30/10 = −0.015. For lighter citizens, skin tone distance's impact on approval is thus nearly 45 percent (−0.015/−0.034) that of ideological distance. 
sum ideo_distance_leader if darker_than_leader == 0, detail
global range_ideo_lighter = r(max)-r(min)

sum skin_distance_leader if darker_than_leader == 0, detail
global range_skin_lighter = r(max)-r(min)

global skin_lighter_beta_range_adj = $skin_lighter_beta*($range_skin_lighter/$range_ideo_lighter)

di $skin_lighter_beta_range_adj/$ideology_beta



**************
**************
*Evidence for Claim Made in the Text: "For executives who are judged to be performing poorly in terms of egotropic economic evaluations, a unit increase in skin tone distance has a −0.056-unit *impact on approval for those lighter in skin tone than the executive (see Model 2 of Table A1). Adjusted for differences in range, this is equal to −0.056×5.30/10 = −0.030."
**************
**************	
xtreg approve_prez c.skin_distance_leader i.ego_retro c.skin_distance_leader#i.darker_than_leader c.skin_distance_leader#i.ego_retro c.skin_distance_leader#i.darker_than_leader#i.ego_retro i.socio_retro ideo_distance_leader i.race education unemployed female, i(cntryyearnum)  fe
margins, dydx(skin_distance_leader) at(darker_than_leader = (0) ego_retro= (1)) predict(xb) atmeans level(90) post coeflegend
global skin_lighter_poor_ego_beta =  -_b[skin_distance_leader]

di $skin_lighter_poor_ego_beta*($range_skin_lighter/$range_ideo_lighter)




**************
**************
*Evidence for Claim Made in the Text: "For executives who are judged to be performing poorly in terms of sociotropic economic evaluations (see Model 3 of Table A1), a unit increase in skin tone *distance has a −0.047-unit impact on approval for those lighter in skin tone than the executive. Adjusted for differences in range, this is equal to −0.047×5.30/10 = −0.025."
**************
**************	
xtreg approve_prez c.skin_distance_leader i.socio_retro c.skin_distance_leader#i.darker_than_leader c.skin_distance_leader#i.socio_retro c.skin_distance_leader#i.darker_than_leader#i.socio_retro i.ego_retro ideo_distance_leader i.race education unemployed female, i(cntryyearnum)  fe
margins, dydx(skin_distance_leader) at(darker_than_leader = (0) socio_retro= (1)) predict(xb) atmeans level(90) post coeflegend
global skin_lighter_poor_socio_beta =  -_b[skin_distance_leader]

di $skin_lighter_poor_socio_beta*($range_skin_lighter/$range_ideo_lighter)


 



*       _------.
*      /  ,     \_
*    /   /  /{}\ |o\_
*   /    \  `--' /-' \* Thanks for replicating!
*  |      \      \    |
* |              |`-, |  
* /              /__/)/
*|              |
